﻿Public Class FormCPU
    Private m_PerformanceCounter As New System.Diagnostics.PerformanceCounter("Processor", "% Processor Time", "_Total")


    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim i As Integer
        i = CInt(m_PerformanceCounter.NextValue())
        Unit1.AccelerateTo(i)
        Unit2.AccelerateTo(i)
        Unit3.Value = i
    End Sub

  

    Private Sub FormCPU_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        Me.TopMost = False
    End Sub

    Private Sub FormCPU_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.TopMost = True

    End Sub


End Class